home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10419 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  42 lines

  1. Newsgroups: comp.lang.c
  2. Path: news.sprintlink.net!news1!ts02-and-20
  3. From: dlmiller@iquest.net (Doug & Rose Miller)
  4. Subject: Re: How do you reset the computer using C on a PC ?
  5. X-Nntp-Posting-Host: ts00-and-02.iquest.net
  6. Message-ID: <DoF9GG.9py@iquest.net>
  7. Sender: news@iquest.net (News Admin)
  8. Organization: IQuest Network Services
  9. X-Newsreader: News Xpress Version 1.0 Beta #2.1
  10. References: <31473FD4.48AA@ccis.com> <4icr32INNfs@mayne.ugrad.cs.ubc.ca>
  11. Date: Sun, 17 Mar 1996 17:14:10 GMT
  12.  
  13. c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) wrote:
  14. +In article <31473FD4.48AA@ccis.com>, Derek Lund  <wlund@ccis.com> wrote:
  15. +>Help?
  16. +
  17. +Write a buggy C program and use it.
  18. +
  19. +--
  20. Try this.  It's untested and may or may not work, but I'm sure it's close.  The ASM code
  21. in comments at the beginning is known to work.
  22.  
  23. /*  Following assembly-language program causes warmboot to occur
  24.  *
  25.  *    MOV AX,0040
  26.  *    MOV DS,AX
  27.  *    MOV WORD PTR [0072],1234         4321 = test memory, 1234 = don't test
  28.  *    JMP FFFF:0000
  29.  */
  30.  
  31. #include <dos.h>
  32.  
  33. void main (void) {
  34. asm {
  35.      MOV AX,0x0040
  36.      MOV DS,AX
  37.      MOV [0x0072],0x1234
  38.      JMP 0xFFFF:0000
  39.     }
  40. }
  41.  
  42.